<template>
  <basic-container>
    <avue-tabs :option="tabsOption" @change="handleChange"></avue-tabs>
    <template v-if="tabsType.prop === '0'">
      <collection :rpiNo="rpiNo" />
    </template>
    <template v-else-if="tabsType.prop === '1'">
      <review :rpiNo="rpiNo" />
    </template>
    <template v-else-if="tabsType.prop === '2'">
      <sales :rpiNo="rpiNo" />
    </template>
    <template v-else-if="tabsType.prop === '3'">
      <bank :rpiNo="rpiNo" />
    </template>
  </basic-container>
</template>

<script>
import { mapGetters } from "vuex";
import collection from "./tabs/collectionList";
import review from "./tabs/reviewList";
import sales from "./tabs/salesList";
import bank from "./tabs/bankList";
export default {
  components: {
    collection,
    review,
    sales,
    bank,
  },
  data() {
    return {
      tabsType: {},
      tabsOption: {
        column: [
          {
            label: "收款人管理",
            prop: "0",
          },
          {
            label: "复核人管理",
            prop: "1",
          },
          {
            label: "销方地址管理",
            prop: "2",
          },
          {
            label: "收款银行管理",
            prop: "3",
          },
        ],
      },
      rpiNo: ''
    };
  },
  computed: {
    ...mapGetters(["permission", "selectMer"]),

  },
  created() {
    this.tabsType = this.tabsOption.column[0];
    this.rpiNo = this.selectMer.rpiNo;
  },
  methods: {
    handleChange(column) {
      this.tabsType = column;
    },
  },
};
</script>

<style>
</style>
